package com.wangyg.breadstore;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
import org.springframework.cloud.openfeign.EnableFeignClients;

@SpringBootApplication
@EnableAutoConfiguration
//@EnableEurekaClient(等同于EnableDiscoveryClient,其是高级抽象)
@EnableDiscoveryClient
@EntityScan("com.wangyg.breadstore.model")//可选配置，自定义jpa模型识别
@EnableFeignClients/*需要引入spring-cloud-starter-openfeign*/
//@EnableCircuitBreaker(等同于EnableHystrix,高级抽象)
@EnableHystrix /*需要引入spring-cloud-starter-netflix-hystrix*/
//开启http:ip:port/hystrix这个监控页面
@EnableHystrixDashboard
@Slf4j
public class BreadStoreApplication {

	public static void main(String[] args) {
		SpringApplication.run(BreadStoreApplication.class, args);
		log.info("bread store project is running");
	}

}
